#include <stdio.h>

void Bubble_Sort(int*, int );

int main()
{
    int data[10] = {230, 23, 59, 10, 10086, 10010, 10000, 86, 154600, 0464};

    printf("brfore sort data:\n");
    int i = 0;
    for(i = 0; i < sizeof(data)/sizeof(data[0]); i++)
        printf("%d\t", data[i]);

    printf("\n__________________________________________________________________\n");
    
    Bubble_Sort(data, sizeof(data)/sizeof(data[0]));
    printf("after sort data:\n");
    for(i = 0; i < sizeof(data)/sizeof(data[0]); i++)
        printf("%d\t", data[i]);

    return 0;
}

void Bubble_Sort(int* arr, int size_num)
{
    int i = 0, j = 0;
    for(i = 0; i < size_num - 1; i++)
    {
        for(j = 0; j < size_num - 1 - i; j++)
        {
            if(arr[j] > arr[j + 1])
            {
                arr[j] = arr[j] + arr[j + 1];
                arr[j + 1] = arr[j] - arr[j + 1];
                arr[j] = arr[j] - arr[j + 1];
            }
        }
    }
}

